﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using ClickReadService;

namespace WCFTest
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                var basicHttpBinding = new BasicHttpBinding(BasicHttpSecurityMode.None);
                ChannelFactory<IClickRead> factory = new ChannelFactory<IClickRead>(
                        basicHttpBinding, new EndpointAddress("http://leozhouvmdev/ClickRead/ClickRead.svc"));

                var channel = factory.CreateChannel();
                var resp = channel.GetPage(1, 1);
                Console.Write("Image is: " + resp.Image.ToString());
                Console.ReadKey();
            }
            catch (Exception ex)
            {
                Console.Write("error is:" + ex.Source.ToString() + ex.InnerException + ex.Message + ex.HelpLink);
                Console.ReadKey();
            }
        }
    }
}
